package com.ssm.gbq.service.impl;

import com.ssm.gbq.dao.ComplaintDao;
import com.ssm.gbq.model.Complaint;
import com.ssm.gbq.service.ComplaintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ComplaintServiceImpl implements ComplaintService {
    @Autowired
    private ComplaintDao complaintDao;
    /**
     * 条件分页获取全部投诉信息
     * @return
     * @throws Exception
     */
    @Override
    public List<Complaint> getALLComplaintTable(Complaint complaint, int currentPage, int pageSize) throws Exception {
        return complaintDao.getALLComplaintTable(complaint,currentPage,pageSize);
    }

    @Override
    public int getALLComplaintTableCount(Complaint complaint) throws Exception {
        return complaintDao.getALLComplaintTableCount(complaint);
    }

    @Override
    public int addComplaint(Complaint complaint) {
        return complaintDao.addComplaint(complaint);
    }

    @Override
    public int updateComplaint(Complaint complaint) {
        return complaintDao.updateComplaint(complaint);
    }

    @Override
    public int delComplaint(Integer id) {
        return complaintDao.delComplaint(id);
    }

    @Override
    public Complaint showComplaintById(Integer id) {
        return complaintDao.showComplaintById(id);
    }


}
